#ifndef XL_UPLOADER_HYPER_LINK_H
#define XL_UPLOADER_HYPER_LINK_H
#include "TransparentStatic.h"

class CHyperLink :
	public CTransparentStatic
{
	CRect m_rcValid;
	tstring m_link;

protected:
	// virtual void drawText(HDC hdc);
	virtual void onSetFont();
	virtual void onSetText();
	virtual void onSetAlign();
	virtual void onSetIcon();

	void _CalcValidRect();

public:
	CHyperLink(const tstring &link = _T(""));
	virtual ~CHyperLink(void);

	void setLink(const tstring &link);

	BEGIN_MSG_MAP(CHyperLink)
		MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
		MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
		MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
		MESSAGE_HANDLER(WM_SIZE, OnSize)
		MESSAGE_HANDLER(WM_CREATE, OnCreate)
		CHAIN_MSG_MAP(CTransparentStatic)
	END_MSG_MAP()

	LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
};

#endif
